<?php
include_once("conn.php");
header("Content-Type:text/html,charset='utf-8'");

$cid = $_POST["cid"];

$query = "select lid from cate_link where cid='".$cid."'";
$result = mysql_query($query);
while( $lid = mysql_fetch_array($result) )
{
	$lid1 = $lid["lid"];
	$query = "delete from link where lid='".$lid1."'";
	mysql_query($query);
}
$query = "delete from cate_link where cid='".$cid."'";
mysql_query($query);

$query = "delete from category where cid='".$cid."'";
mysql_query($query);


?>